<%@ page pageEncoding="utf-8" %>
<%@include file="/commons/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<fmt:bundle basename="res">
<head>
    <meta charset="utf-8">
    <title><fmt:message key='fxspxq'/></title>
    <jsp:include page="/WEB-INF/commons/commons-header.jsp" flush="true"/>
    <style>
        html {
            background: #fff;
        }
    </style>
</head>

<body>
<div class="layui-container">
    <div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 20px 30px 0 0;">

        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
            <legend><fmt:message key='jbxx'/></legend>
        </fieldset>

        <div class="layui-form-item">
            <label class="layui-form-label"><fmt:message key='spmc'/></label>
            <div class="layui-form-mid layui-word-aux">
                ${distributionGoods.goods.name}
            </div>
        </div>

        <div class="layui-form-item goodsChannelArea">
            <label class="layui-form-label"><fmt:message key='spfl'/></label>

            <div class="layui-form-mid layui-word-aux">
                ${distributionGoods.goods.goodsChannel.parent.parent.name} >> ${distributionGoods.goods.goodsChannel.parent.name} >> ${distributionGoods.goods.goodsChannel.name}
            </div>

        </div>

        <div class="layui-form-item">
            <label class="layui-form-label"><fmt:message key='spjg'/></label>
            <div class="layui-form-mid layui-word-aux">
                <fmt:formatNumber value="${distributionGoods.goods.defaultPrice}" type="CURRENCY"/>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label"><fmt:message key='bdje'/></label>
            <div class="layui-form-mid layui-word-aux">
                <fmt:formatNumber value="${distributionGoods.guaranteeScale * 100}"/>% (<fmt:formatNumber value="${distributionGoods.guaranteeScale * distributionGoods.goods.defaultPrice}"/>)
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label"><fmt:message key='fxfw'/></label>
            <div class="layui-form-mid layui-word-aux">
                <c:if test="${distributionGoods.distributorScope == 1}"><fmt:message key='qbfxs'/></c:if>
                <c:if test="${distributionGoods.distributorScope == 2}"><fmt:message key='zdfxs'/></c:if>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label"><fmt:message key='kc'/></label>
            <div class="layui-form-mid layui-word-aux">
                ${distributionGoods.goods.store}
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label"><fmt:message key='zt'/></label>
            <div class="layui-form-mid layui-word-aux">
                <c:if test="${distributionGoods.status == 1}"><fmt:message key='ysj'/></c:if>
                <c:if test="${distributionGoods.status == 2}"><fmt:message key='yxj'/></c:if>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label"><fmt:message key='sptp'/></label>
            <div class="layui-form-mid layui-word-aux">
                <img src="${store_domain}/uploads/${distributionGoods.goods.defaultImage}" class="preview" style="max-width: 300px; max-height: 300px; margin-top: 20px">
            </div>
        </div>


        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
            <legend><fmt:message key='yjxx'/></legend>
        </fieldset>

        <table class="layui-table">
            <thead>
            <tr>
                <th><fmt:message key='djmc'/></th>
                <th><fmt:message key='yjyjbl'/></th>
                <th><fmt:message key='ejyjbl'/></th>
            </tr>
            </thead>
            <c:forEach var="item" items="${levels}">
                <tr>
                    <td>${item.levelName}</td>
                    <td>${item.first}%</td>
                    <td>${item.second}%</td>
                </tr>
            </c:forEach>
        </table>

    </div>
</div>

<script>

    $(function () {

        layui.use(['form', 'laydate'], function () {

            var form = layui.form;
            var laydate = layui.laydate;

        });

    });
</script>
</body>
</fmt:bundle>
</html>